trait Shape<T1, T2 = i32> {
    fn get_area(&self) -> T1;
}

struct Rect<T> {
    x: T,
    y: T,
}

impl<T1, T2> Shape<T1, T2> for Rect<T1>
where
    T1: std::ops::Mul<Output = T1> + Copy,
{
    fn get_area(&self) -> T1 {
        self.x * self.y
    }
}

fn main() {
    let rect = Rect { x: 10, y: 10 };
    println!("area:{}", <Rect<i32> as Shape<i32,i32>>::get_area(&rect));
}
